<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" session="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <title>支付宝授权管理</title>

    <link href="${pageContext.request.contextPath}/static/css/common.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/css/bootstrap.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css"
          rel="stylesheet">
    <!-- jqgrid-->
    <link href="${pageContext.request.contextPath}/static/plugins/jqGrid/css/custom.ui.jqgrid.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/layer/skin/layer.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/jqGrid/css/style.css" rel="stylesheet">

    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/jquery.form.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/common.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/jqGrid/js/i18n/grid.locale-cn.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/jqGrid/js/minified/jquery.jqGrid.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/layer/layer.js" type="text/javascript"></script>

    <style type="text/css">
        .main h5 a {
            position: absolute;
            right: 20px;
            font-size: 14px;
            bottom: 0px;
            display: inline-block;
            padding: 5px;
        }

        .table_list tbody tr {
            height: 35px;
            text-align: center;
        }
    </style>
</head>
<body view="menu-item-4142" onload="closeWindow();">
<div >
    <div class="jqGrid_wrapper">
        <div id="jqGrid_operation" class="jg-grid">
            <h1>支付宝授权确认</h1>
            <div class="jqGrid_operation" id="action"></div>
        </div>

        <div class="col-sm-12" style="text-align: center;font-size: 4em;margin-top: 1em;">
		  	  <font id ="msg"></font>
		</div>
		<div id="show" style="text-align: center;font-size: 4em;margin-top: 1em;">  
			本窗口将会在20秒后关闭
		</div>  
		<div style="text-align: center;">
     	</div>
    </div>
</div>

<script>
	var time=20; 
    $(function () {
    	$("#msg").html('${result.msg}');
    });
    function closeWindow(){  
    	window.setTimeout('closeWindow()',1000);  
    	if(time>0){  
    		document.getElementById("show").innerHTML="本窗口将会在<font color=red>"+time+"</font>秒后关闭";  
    		time--; 
    	}  
    	else{  
    		var browserName=navigator.appName; //获取浏览器名称  
//     		closeWindows();
    		if (browserName=="Netscape") {   
//     			window.open("about:blank","_self").close();
//     			open(' ', '_self').close();
//     			window.open('${pageContext.request.contextPath}/admin/feeAlipayAuth_black.action','_self');
//     			window.open('${pageContext.request.contextPath}/admin/feeAlipayAuth_black.action','_parent','');
//     			window.close();
//     			 var opener = null;
//     			 opener = window.open(' ','_self');
//     		     opener.document.body.style.background = 'red';
//     		     	opener.close();

				f_close();
    		}else{   
    		    if (browserName=="Microsoft Internet Explorer") {   
    		            window.opener = "test";   
    		            window.close();   
    		    }   
    		} 
			
    	}  
    	}
   
    function f_close(){
        if(typeof(WeixinJSBridge)!="undefined"){
            WeixinJSBridge.call('closeWindow');
        }else{
            if (navigator.userAgent.indexOf("MSIE") > 0) {  
                if (navigator.userAgent.indexOf("MSIE 6.0") > 0) {  
                    window.opener = null; window.close();  
                }  
                else {  
                    window.open('', '_top'); window.top.close();  
                }  
            }  
            else if (navigator.userAgent.indexOf("Firefox") > 0) {  
                window.location.href = 'about:blank ';  
                //window.history.go(-2);  
            }  
            else {  
                window.opener = null;   
                window.open('about:blank', '_self', '');  
                window.close();  
//             	window.open("about:blank","_self").close();
            }
        }
    }
   
</script>
</body>
</html>
